Inheritance
•
Inheritance allows to implement the
a-kind-of
and
is-a
relationships.
•
Classes which are a-kind-of another class share
properties of the latter.
•
In the point and circle example, it can be defined as
a
circle which inherits from point.
Class Circle inherits
all data elements
and methods from
point. There is no
need to define them
twice.